# -*- coding: utf-8 -*-
'''
使用sqlalchemy作为orm操作框架
'''
from sqlalchemy import Column, Integer, String, SmallInteger
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class Customer(Base):
    __tablename__ = 'ncrm_customer'

    id = Column(Integer, primary_key=True)
    shop_id = Column(String)
    is_b2c = Column(SmallInteger)

class BShop(Base):
    __tablename__ = 'b_shop'
    id = Column(Integer, primary_key=True)
    shop_id = Column(String)

class ScrapyShopGoodsInfo(Base):
    __tablename__ = 'scrapy_shop_goods_info'

    id = Column(Integer, primary_key=True)
    shop_id = Column(String)
    title = Column(String)
    href = Column(String)
    price = Column(String)
    sales = Column(String)
    evaluation_num = Column(String)
    cat_id = Column(String)

class ShopMainCategoryTable(Base):

    __tablename__ = 'shop_main_category'

    id = Column(Integer, primary_key=True)
    shop_id = Column(String)
    main_category = Column(String)

